﻿using Abp.Authorization;
using Abp.AutoMapper;
using Abp.Modules;
using Abp.Reflection.Extensions;
using Ny.CenterServers.Permissions;

namespace Ny.CenterServers
{
    /// <summary>
    /// 应用逻辑层
    /// </summary>
    [DependsOn(
        typeof(CenterServersCoreModule), 
        typeof(AbpAutoMapperModule))]
    public class CenterServersApplicationModule : AbpModule
    {
        /// <summary>
        /// 预初始化
        /// </summary>
        public override void PreInitialize()
        {
            //添加权限认证
            Configuration.Authorization.Providers.Add<TestAuthorizationProvider>();
            
        }
        /// <summary>
        /// 初始化
        /// </summary>
        public override void Initialize()
        {
    
            IocManager.RegisterAssemblyByConvention(typeof(CenterServersApplicationModule).GetAssembly());
            
        }
    }
}